/*
 * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package top.continew.admin.asset.model.req;

import jakarta.validation.constraints.*;

import lombok.Data;

import io.swagger.v3.oas.annotations.media.Schema;

import org.hibernate.validator.constraints.Length;

import java.io.Serial;
import java.io.Serializable;
import java.time.*;

/**
 * 创建或修改耗材参数
 *
 * @author CharlieYan
 * @since 2025/05/07 17:38
 */
@Data
@Schema(description = "创建或修改耗材参数")
public class ConsumableRecordsReq implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 名称
     */
    @Schema(description = "名称")
    @NotBlank(message = "名称不能为空")
    @Length(max = 200, message = "名称长度不能超过 {max} 个字符")
    private String name;

    /**
     * 分类ID
     */
    @Schema(description = "分类ID")
    @NotNull(message = "分类ID不能为空")
    private Long categoryId;

    /**
     * 分类
     */
    @Schema(description = "分类")
    private String categoryName;

    /**
     * 规格
     */
    @Schema(description = "规格")
    @NotBlank(message = "规格不能为空")
    @Length(max = 20, message = "规格长度不能超过 {max} 个字符")
    private String specification;

    /**
     * 采购价格
     */
    @Schema(description = "采购价格")
    private Double price;

    /**
     * 供应商ID
     */
    @Schema(description = "供应商ID")
    private Long producerId;

    /**
     * 供应商
     */
    @Schema(description = "供应商")
    private String producerName;

    /**
     * 描述
     */
    @Schema(description = "描述")
    @Length(max = 250, message = "描述长度不能超过 {max} 个字符")
    private String description;
}